package com.example.storage.service.impl;

import com.example.storage.mapper.StorageMapper;
import com.example.storage.service.StorageService;
import com.example.storage.tcc.StorageTccAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class StorageServiceImpl implements StorageService {

    @Autowired
    private StorageMapper storageMapper;

    @Autowired
    private StorageTccAction storageTccAction;

    @Override
    public void decrease(Long productId,Integer num) {
        storageTccAction.prepare(null, productId, num);
//        storageMapper.decrease(productId,num);
    }
}
